package com.hl.sfzy.controller.course;

import com.hl.sfzy.service.course.TeacherService;
import com.hl.sfzy.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: sfzy
 * @description:
 * @author: xiaoyan
 * @create: 2024-09-06 16:22
 **/

@RestController
@RequestMapping("/teacher")
public class TeacherAllController {
    @Autowired
   private TeacherService teacherService;

    @GetMapping("/content")
    public R teacherAllContent(){
        List list = teacherService.teacherAllContent();
        return list.size()>0?R.success(list):R.failure("500");
    }
}
